var arr = [
    { id: 1, name: '周瑜1', age: 34 },
    { id: 3, name: '王昭君1', age: 33 },
    { id: 2, name: '李白1', age: 34 },
    { id: 1, name: '周瑜2', age: 35 },
    { id: 2, name: '李白2', age: 37 },
    { id: 3, name: '王昭君2', age: 34 },
    { id: 1, name: '周瑜1', age: 34 },
    { id: 1, name: '周瑜2', age: 35 },
]

function arrLon(arr = []) {
    let arrNew = [];
    for (let i = 0; i < arr.length; i++) {
        if (arrNew.findIndex(v => v.id == arr[i].id && v.name == arr[i].name && v.age == arr[i].age) < 0) {
            arrNew.push(arr[i]);
        }
    }
    return arrNew;
}
// console.log(arrLon(arr));

function arrLon2(arr = []) {
    return arr.reduce((item = [], next) => {
        // if(array.)
        let index = item.findIndex((v) => v.id == next.id && v.name == next.name && v.age == next.age);
        if (index < 0) {
            item.push(next);
        }
        return item;
    }, [])
}
console.log(arrLon2(arr));